package com.bafa.front;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.dbcache.LeagueCache;
import com.bafa.exceptions.ErrorException;
import com.bafa.objects.PageBean;
import com.bafa.services.RetrieveServices;

public class DisplayAllSeasonsServlet extends DaddyServlet {

	@Override
	public void doEvent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ErrorException {
		request.setAttribute("LEAGUESEASONS",RetrieveServices.getLeagueSeasons());
		PageBean pageBeanTemp = (PageBean)LeagueCache.getPages().get("seasons");
		pageBean = new PageBean(pageBeanTemp);
		String pageHeader = pageBean.getPageheader().replaceAll("<>","All Seasons");
		pageBean.setPageheader(pageHeader);
	}
}
